//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.mouslisten;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import org.come.Frame.TestpackJframe;
import org.come.Frame.ZhuFrame;
import org.come.Jpanel.GiveJpanel;
import org.come.entity.Goodstable;
import org.come.until.GoodsListFromServerUntil;
import org.come.until.MessagrFlagUntil;

public class GiveGoodsMouslisten implements MouseListener {
    private int goodsPlace;
    private GiveJpanel giveJpanel;

    public GiveGoodsMouslisten(int goodsPlace, GiveJpanel giveJpanel) {
        this.goodsPlace = goodsPlace;
        this.giveJpanel = giveJpanel;
    }

    @Override
    public void mouseClicked(MouseEvent e) {
    }

    @Override
    public void mousePressed(MouseEvent e) {
        this.giveJpanel.xuanzhong(GoodsListFromServerUntil.getGoodslist()[this.goodsPlace + GoodsListFromServerUntil.Pagenumber * 24], this.goodsPlace);
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }

    @Override
    public void mouseEntered(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE12);
        Goodstable goodstable = GoodsListFromServerUntil.getGoodslist()[this.goodsPlace + GoodsListFromServerUntil.Pagenumber * 24];
        if (goodstable != null) {
            this.giveJpanel.PaintingText(this.goodsPlace);
            TestpackJframe.getTestpackJframe().getJpac().PaintingText(this.goodsPlace);
            ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
        }

    }

    @Override
    public void mouseExited(MouseEvent e) {
        MessagrFlagUntil.setMouse(MessagrFlagUntil.MOUSE1);
        this.giveJpanel.ClearText(this.goodsPlace);
        ZhuFrame.getZhuJpanel().cleargoodtext();
    }

    public int getGoodsPlace() {
        return this.goodsPlace;
    }

    public void setGoodsPlace(int goodsPlace) {
        this.goodsPlace = goodsPlace;
    }
}
